import Layout from '@/layout'
import RouteButtonsBuilder from '@/framework/infra/router/RouterButtonsBuilder'
import TableButtonType from '@/framework/constant/TableButtonType';

export default [
  {
    path: '/mj',
    component: Layout,
    meta: { title: '内容管理', icon: 'el-icon-s-help' },
    children: [
      {
        path: 'hotel',
        component: () => import('@/feature/mj/app/hotel/index'),
        meta: {title: '酒店管理', icon: 'table'},
        buttons: RouteButtonsBuilder.builder('mj:hotel')
          .addButtons([
            {
              handler: 'list',
              name: 'list',
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'export',
              name: 'export',
              type: TableButtonType.TOOLBAR_RIGHT,
              label: '导出',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
            {
              handler: 'create',
              name: 'create',
              type: TableButtonType.TOOLBAR,
              label: '新建酒店管理',
              icon: 'el-icon-plus'
            },
            {
              handler: 'update',
              name: 'update',
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              name: 'remove',
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            }
          ])
          .build()
      },
      {
        path: 'scenic-spot',
        component: () => import('@/feature/mj/app/scenic-spot/index'),
        meta: { title: '景点管理', icon: 'table' },
        buttons: RouteButtonsBuilder.builder('mj:scenic-spot')
          .addButtons([
            {
              handler: 'list',
              name: 'list',
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'export',
              name: 'export',
              type: TableButtonType.TOOLBAR_RIGHT,
              label: '导出',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
            {
              handler: 'create',
              name: 'create',
              type: TableButtonType.TOOLBAR,
              label: '新建景点',
              icon: 'el-icon-plus'
            },
            {
              handler: 'update',
              name: 'update',
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              name: 'remove',
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            }
          ])
          .build()
      },
      {
        path: 'scenic-spot-tag',
        component: () => import('@/feature/scenic/app/scenic-spot-tag/index'),
        meta: {title: '标签管理', icon: 'table'},
        buttons: RouteButtonsBuilder.builder('mj:scenic-spot-tag')
          .addButtons([
            {
              handler: 'list',
              name: 'list',
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'export',
              name: 'export',
              type: TableButtonType.TOOLBAR_RIGHT,
              label: '导出',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
            {
              handler: 'create',
              name: 'create',
              type: TableButtonType.TOOLBAR,
              label: '新建景点标签',
              icon: 'el-icon-plus'
            },
            {
              handler: 'update',
              name: 'update',
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              name: 'remove',
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            }
          ])
          .build()
      },
      {
        path: 'spot-recommend',
        component: () => import('@/feature/mj/app/spot-recommend/index'),
        meta: {title: '推荐官管理', icon: 'table'},
        buttons: RouteButtonsBuilder.builder('mj:spot-recommend')
          .addButtons([
            {
              handler: 'list',
              name: 'list',
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'export',
              name: 'export',
              type: TableButtonType.TOOLBAR_RIGHT,
              label: '导出',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
            {
              handler: 'create',
              name: 'create',
              type: TableButtonType.TOOLBAR,
              label: '新建景点推荐官',
              icon: 'el-icon-plus'
            },
            {
              handler: 'update',
              name: 'update',
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              name: 'remove',
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            }

          ])
          .build()
      },
      {
        path: 'travel-guide',
        component: () => import('@/feature/mj/app/travel-guide/index'),
        meta: {title: '导游管理', icon: 'table'},
        buttons: RouteButtonsBuilder.builder('mj:travel-guide')
          .addButtons([
            {
              handler: 'list',
              name: 'list',
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'export',
              name: 'export',
              type: TableButtonType.TOOLBAR_RIGHT,
              label: '导出',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
            {
              handler: 'create',
              name: 'create',
              type: TableButtonType.TOOLBAR,
              label: '新建导游管理',
              icon: 'el-icon-plus'
            },
            {
              handler: 'update',
              name: 'update',
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              name: 'remove',
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            }

          ])
          .build()
      },
      {
        path: 'travel-strategy',
        component: () => import('@/feature/mj/app/travel-strategy/index'),
        meta: {title: '旅游攻略', icon: 'table'},
        buttons: RouteButtonsBuilder.builder('mj:travel-strategy')

          .addButtons([
            {
              handler: 'list',
              name: 'list',
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'export',
              name: 'export',
              type: TableButtonType.TOOLBAR_RIGHT,
              label: '导出',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
            {
              handler: 'create',
              name: 'create',
              type: TableButtonType.TOOLBAR,
              label: '新建旅游攻略',
              icon: 'el-icon-plus'
            },
            {
              handler: 'update',
              name: 'update',
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              name: 'remove',
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            },
            {
              handler: 'goodsManager',
              name: 'lms:strategy-lines',
              type: TableButtonType.ROW,
              label: '修改站点',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
          ])
          .build()
      },
      // {
      //   path: 'travel-strategy-hotel',
      //   component: () => import('@/feature/mj/app/travel-strategy-hotel/index'),
      //   meta: {title: '旅游攻略酒店推荐', icon: 'table'},
      //   buttons: RouteButtonsBuilder.builder('mj:travel-strategy-hotel')
      //
      //     .addButtons([
      //       {
      //         handler: 'list',
      //         name: 'list',
      //         type: TableButtonType.SEARCHBAR,
      //         label: '搜索',
      //         icon: 'el-icon-search'
      //       },
      //       {
      //         handler: 'export',
      //         name: 'export',
      //         type: TableButtonType.TOOLBAR_RIGHT,
      //         label: '导出',
      //         buttonType: 'primary',
      //         icon: 'el-icon-download'
      //       },
      //       {
      //         handler: 'create',
      //         name: 'create',
      //         type: TableButtonType.TOOLBAR,
      //         label: '新建旅游攻略酒店推荐',
      //         icon: 'el-icon-plus'
      //       },
      //       {
      //         handler: 'update',
      //         name: 'update',
      //         type: TableButtonType.ROW,
      //         label: '修改',
      //         icon: 'el-icon-edit'
      //       },
      //       {
      //         handler: 'remove',
      //         name: 'remove',
      //         type: TableButtonType.ROW,
      //         label: '删除',
      //         buttonType: 'danger',
      //         icon: 'el-icon-delete'
      //       }
      //
      //     ])
      //     .build()
      // },
      // {
      //   path: 'travel-strategy-special',
      //   component: () => import('@/feature/mj/app/travel-strategy-special/index'),
      //   meta: {title: '旅游攻略特殊路线', icon: 'table'},
      //   buttons: RouteButtonsBuilder.builder('mj:travel-strategy-special')
      //
      //     .addButtons([
      //       {
      //         handler: 'list',
      //         name: 'list',
      //         type: TableButtonType.SEARCHBAR,
      //         label: '搜索',
      //         icon: 'el-icon-search'
      //       },
      //       {
      //         handler: 'export',
      //         name: 'export',
      //         type: TableButtonType.TOOLBAR_RIGHT,
      //         label: '导出',
      //         buttonType: 'primary',
      //         icon: 'el-icon-download'
      //       },
      //       {
      //         handler: 'create',
      //         name: 'create',
      //         type: TableButtonType.TOOLBAR,
      //         label: '新建旅游攻略特殊路线',
      //         icon: 'el-icon-plus'
      //       },
      //       {
      //         handler: 'update',
      //         name: 'update',
      //         type: TableButtonType.ROW,
      //         label: '修改',
      //         icon: 'el-icon-edit'
      //       },
      //       {
      //         handler: 'remove',
      //         name: 'remove',
      //         type: TableButtonType.ROW,
      //         label: '删除',
      //         buttonType: 'danger',
      //         icon: 'el-icon-delete'
      //       }
      //
      //     ])
      //     .build()
      // },
      {
        path: 'type',
        component: () => import('@/feature/mj/app/travel-strategy-type/index'),
        meta: {title: '攻略类型', icon: 'table'},
        buttons: RouteButtonsBuilder.builder('mj:type')

          .addButtons([
            {
              handler: 'list',
              name: 'list',
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'export',
              name: 'export',
              type: TableButtonType.TOOLBAR_RIGHT,
              label: '导出',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
            {
              handler: 'create',
              name: 'create',
              type: TableButtonType.TOOLBAR,
              label: '新建攻略类型',
              icon: 'el-icon-plus'
            },
            {
              handler: 'update',
              name: 'update',
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              name: 'remove',
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            }

          ])
          .build()
      },
      {
        path: 'service',
        component: () => import('@/feature/mj/app/service/index'),
        meta: {title: '服务管理', icon: 'table'},
        buttons: RouteButtonsBuilder.builder('mj:service').oo()

          .addButtons([
            {
              handler: 'list',
              name: 'list',
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'export',
              name: 'export',
              type: TableButtonType.TOOLBAR_RIGHT,
              label: '导出',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
            {
              handler: 'create',
              name: 'create',
              type: TableButtonType.TOOLBAR,
              label: '新建服务',
              icon: 'el-icon-plus'
            },
            {
              handler: 'update',
              name: 'update',
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              name: 'remove',
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            }


          ])
          .build()
      },
      {
        path: 'service-type',
        component: () => import('@/feature/mj/app/service-type/index'),
        meta: {title: '服务类型', icon: 'table'},
        buttons: RouteButtonsBuilder.builder('mj:service-type')
          .addButtons([
            {
              handler: 'list',
              name: 'list',
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'export',
              name: 'export',
              type: TableButtonType.TOOLBAR_RIGHT,
              label: '导出',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
            {
              handler: 'create',
              name: 'create',
              type: TableButtonType.TOOLBAR,
              label: '新建服务类型',
              icon: 'el-icon-plus'
            },
            {
              handler: 'update',
              name: 'update',
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              name: 'remove',
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            }


          ])
          .build()
      },
      {
        path: 'project',
        component: () => import('@/feature/mj/app/project/index'),
        meta: {title: '百千万工程', icon: 'table'},
        buttons: RouteButtonsBuilder.builder('mj:project')

          .addButtons([
            {
              handler: 'list',
              name: 'list',
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'export',
              name: 'export',
              type: TableButtonType.TOOLBAR_RIGHT,
              label: '导出',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
            {
              handler: 'create',
              name: 'create',
              type: TableButtonType.TOOLBAR,
              label: '新建百千万工程',
              icon: 'el-icon-plus'
            }, {
              handler: 'spotManager',
              name: 'mj:project-spot:list',
              type: TableButtonType.ROW,
              label: '景点管理',
              icon: 'el-icon-plus'
            },
            {
              handler: 'update',
              name: 'update',
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              name: 'remove',
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            },


            {
              handler: 'list',
              name: 'list',
              groupId: 2,
              type: TableButtonType.SEARCHBAR,
              label: '搜索',
              icon: 'el-icon-search'
            },
            {
              handler: 'export',
              groupId: 2,
              name: 'export',
              type: TableButtonType.TOOLBAR_RIGHT,
              label: '导出',
              buttonType: 'primary',
              icon: 'el-icon-download'
            },
            {
              handler: 'create',
              name: 'create',
              groupId: 2,
              type: TableButtonType.TOOLBAR,
              label: '新建百千万工程景点',
              icon: 'el-icon-plus'
            },
            {
              handler: 'update',
              name: 'update',
              groupId: 2,
              type: TableButtonType.ROW,
              label: '修改',
              icon: 'el-icon-edit'
            },
            {
              handler: 'remove',
              name: 'remove',
              groupId: 2,
              type: TableButtonType.ROW,
              label: '删除',
              buttonType: 'danger',
              icon: 'el-icon-delete'
            }


          ])
          .build()
      }
      // {
      //   path: 'project-spot',
      //   component: () => import('@/feature/mj/app/project-spot/index'),
      //   meta: {title: '百千万工程景点', icon: 'table'},
      //   buttons: RouteButtonsBuilder.builder('mj:project-spot')
      //
      //     .addButtons([
      //       {
      //         handler: 'list',
      //         name: 'list',
      //         type: TableButtonType.SEARCHBAR,
      //         label: '搜索',
      //         icon: 'el-icon-search'
      //       },
      //       {
      //         handler: 'export',
      //         name: 'export',
      //         type: TableButtonType.TOOLBAR_RIGHT,
      //         label: '导出',
      //         buttonType: 'primary',
      //         icon: 'el-icon-download'
      //       },
      //       {
      //         handler: 'create',
      //         name: 'create',
      //         type: TableButtonType.TOOLBAR,
      //         label: '新建百千万工程景点',
      //         icon: 'el-icon-plus'
      //       },
      //       {
      //         handler: 'update',
      //         name: 'update',
      //         type: TableButtonType.ROW,
      //         label: '修改',
      //         icon: 'el-icon-edit'
      //       },
      //       {
      //         handler: 'remove',
      //         name: 'remove',
      //         type: TableButtonType.ROW,
      //         label: '删除',
      //         buttonType: 'danger',
      //         icon: 'el-icon-delete'
      //       }
      //
      //     ])
      //     .build()
      // },,
      // #appendSpot# 生成工具用，不要删了
    ]
  }
]
